home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.46 / stinglibpcq / english / string.i < prev    next >
Text File  |  1995-03-27  |  2KB  |  66 lines

  1.  
  2. {
  3.       A set of functions especialy created in order to help using strings
  4.    under PCQ Pascal compiler. Those functions complete already existing
  5.    functions of 'StringLib'.
  6.  
  7.       For noone of the functions you have to allocate memory for the returned
  8.    string because memory is allocated by the functions themself.
  9.  
  10.       Note that the Str_Copy, Str_Delete and Str_Insert functions came
  11.    from the Borland Turbo Pascal.
  12.  
  13.       Those functions have been compiled under the 1.2b version of february
  14.    1993. It seems to be no problem using String.Lib with older or newer
  15.    version.
  16. }
  17.  
  18. {$I "include:utils/stringlib.i"}
  19.  
  20. type
  21.    Str_List = record
  22.       pos  : integer;
  23.       next : ^Str_List;
  24.    end;
  25.  
  26.    Str_ListPtr = ^Str_List;
  27.  
  28.  
  29.  
  30. Function Str_Lower(s : string) : string;
  31. External;
  32.  
  33. { return string in small letters }
  34.  
  35. Function Str_Upper(s : string) : string;
  36. External;
  37.  
  38. { Return string in capital letter }
  39.  
  40. Function Str_Copy(s : string;dep,long : integer) : string;
  41. External;
  42.  
  43. { Return a string which is a part of the beginning string }
  44.  
  45. Function Str_Delete(s : string;dep,long : integer) : string;
  46. External;
  47.  
  48. { Return a string which is cut }
  49.  
  50. Function Str_Insert(s,s1 : string;pos : integer) : string;
  51. External;
  52.  
  53. { Return a string where s1 is inserted in s }
  54.  
  55. Function Str_C_Pos(s : string;c : char) : Str_ListPtr;
  56. External;
  57.  
  58. { return a linked list whithe each position of c in s, or nil }
  59.  
  60. Procedure Str_FreeStr_List(p : Str_ListPtr);
  61. External;
  62.  
  63. { Free memory allocated by Str_C_Pos. Just give it the address of the first
  64.  element of the list.
  65.  
  66.   See the Trial_Str_C_Pos prog to have more information to use Str_C_Pos. }